# this is a sample python app that gets data from the standard provider
import httplib, sys
conn = httplib.HTTPConnection("localhost",8080)
url = "standard.json"
if (len(sys.argv) <= 1):
  print "You must provide the eb URL (the part after /eb) as an argument to get some sample data: e.g. /standard.xml"
  sys.exit()
else:
  url = sys.argv[1]
print "Request to:", "/eb"+url
conn.request("GET", "/eb" + url)
res = conn.getresponse()
print "Status:", res.status, res.reason
data = res.read()
print "Content:", data
conn.close()
